package com.tqz.dt.status;

import lombok.Data;

/**
 * <p>事务状态
 *
 * @author tianqingzhao
 * @since 2021/7/7 15:30
 */
@Data
public class DefaultGlobalTransactionStatus extends AbstractTransactionStatus {

    private final Object transaction;

    private final boolean newTransaction;

    private final boolean newSynchronization;

    private final boolean readOnly;

    @Override
    public boolean isNewTransaction() {
        return this.transaction != null && this.newTransaction;
    }
}
